import {createRouter, createWebHistory} from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
    {
        path: '/',
        component: HomeView,
        redirect: '/home',
    },
    {path: '/blog/:blogId',name:'blogView', component: () => import('../views/blog/BlogView.vue')},
    {path: '/user', component: () => import('../views/user/UserHomeView.vue')},
    {path: '/login', component: () => import('../views/LoginView')},
    {path:'/home',component:()=>import('../views/HomeView.vue')},
    {path:'/page',component:()=>import('../views/page/PageView.vue')},
    {path:'/page',component: ()=>import('../views/blog/Comment.vue')}
]
const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
